const equipment = {
	dom: '',
	editorDom: (dom) => {
		// console.log($(dom))
		// console.log(dom)
		$(dom).draggable({cursor: 'move',disabled: false})
	},
	notEditorDom: (dom) => {
		$(dom).draggable({disabled: true})
	},
	/**
	 * 初始化，获取容器的高宽
	 */
	init: (dom, callBack) => {
		const vesselW = $(dom).width()
		const vesselH = $(dom).height()
		callBack(
			{
				vesselW,
				vesselH
			}
		)
	},
	/**
	 * 页面元素的显示
	 */
	show: (dom) => {
		$(dom).show()
	},
	/**
	 * 页面元素的隐藏
	 */
	hide: (dom) => {
		$(dom).hide()
	},
	/**
	 * 页面元素的删除
	 */
	remove: (dom) => {
		$(dom).remove()
	},
	/**
	 * 设置页面元素的高
	 */
	setHeight: (dom, num) => {
		$(dom).css('height', num)
	},
	/**
	 * 设置页面元素的宽
	 */
	setWidth: (dom, num) => {
		$(dom).css('width', num)
	},
	/**
	 * 设置页面元素的背景颜色
	 */
	setBgColor: (dom, color) => {
		$(dom).css('background-color', color?color:'')
	},
	/**
	 * 设置页面元素的边框大小
	 */
	setBorder: (dom, num) => {
		$(dom).css('border-width', num)
	},
	/**
	 * 设置页面元素的边框颜色
	 */
	setBorderColor: (dom, color) => {
		console.log(color)
		$(dom).css('border-color', color?color:'transparent')
	},
}
export default equipment